﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Linq;
namespace BaBaoFan.Modifier.Model
{
    public class PoolInfoDto
    {
        public PoolInfoDto()
        {
            CoinInfos = new List<CoinInfo>();
        }
        public int Id { get; set; }
        public string PoolName { get; set; }
        public string PoolLogo { get; set; }
        public string PoolArea { get; set; }
        public string PoolPayTime { get; set; }
        public string PoolAddress { get; set; }
        public int PoolState { get; set; }
        public int Sort { get; set; }
        public string PoolDescription { get; set; }
        public string KeyWords { get; set; }
        public int PoolScore { get; set; }
        public DateTime AddTime { get; set; }
        public int IsVisable { get; set; }
        public List<CoinInfo> CoinInfos { get; set; }

        public string FormatCoinInfos()
        {
            if (CoinInfos == null)
                return "";
            var coinNames = CoinInfos.Select(x => x.CoinName);
            if (coinNames == null)
                return "";
            try
            {
                return string.Join(",", coinNames);
            }
            catch (Exception ex)
            {
                return "";
            }
          
        }
    }
}
